header<template>
    <div class="wrap">
        <div class="header">
            <van-nav-bar
                title="消息中心"
                left-arrow
                @click-left="onClickLeft"
            />
        </div>
        <div class="main">
            <ul class="onLine">
                <li>
                    <van-icon name="audio" />
                </li>
                <li>
                    <p>在线客服</p>
                    <a href="javascript:;">查看沟通记录</a>
                </li>
            </ul>
            <div class="news">
                <van-empty description="您目前还内有消息">
                    <van-button class="bottom-button" @click="toIndex">
                        去逛逛吧
                    </van-button  >
                </van-empty>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
    data() {
        return {};
    },

    methods: {
        onClickLeft() {     // 左箭头回退
            this.$router.go(-1)
            this.$store.commit('changeShowMine',true)
        },
        toIndex(){          // 回到首页
            this.$router.push('/')
        }   
       
    }
};
</script>
<style lang='stylus' scoped>
// 主页全屏
.wrap 
    background #eee
    position absolute
    top 0
    left 0
    right 0
    bottom 0
    z-index 350

.header
    width 100%
    position fixed
    top 0
    left 0
    background #fff
// 主页面
.main
    width 100%
    overflow auto
    margin-top 48px
    .onLine
        background #fff
        margin-bottom 10px
        font-size 18px
        line-height 30px
        display flex
        padding 16px
        .van-icon
            font-size 40px
            background #FFE793
            color #fff
            width 60px
            height 60px
            text-align center
            line-height 60px
            border-radius 50%
            margin-right 16px
        a
            color #ccc
.bottom-button {
    width: 160px;
    height: 40px;
    background: #CA013D;
    color #fff
  }   
    
// 改变Vant默认颜色
/deep/ .van-nav-bar__arrow
    color #4E4E4E
</style>
